@import '../style/theme/color';
@import '../style/theme/corner';

.devui-select-tag-list {
  height: 26px;
  margin: 0;
  padding: 0;
  list-style-type: none;
  overflow: hidden;

  &.normal {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  &.scroll-y {
    overflow-y: auto;
    overflow-x: hidden;
  }

  &.multiple-line {
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
    line-height: 1.5;
    max-height: 48px;
  }

  .over-flow-ellipsis {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    height: 20px;
    line-height: 20px;
    vertical-align: middle;
  }
}

.devui-select-tag-item {
  display: inline-block;
  margin: 1px;
  padding: 0 4px;
  border-radius: $devui-border-radius;
  color: $devui-text;
  background: $devui-label-bg;
  max-width: 100%;
  position: relative;
  border: 1px solid $devui-label-bg;

  &:not(.disabled) {
    span {
      display: inline-block;
      max-width: 100%;
      padding-right: 30px;

      &:hover {
        color: $devui-brand;
      }
    }
  }

  &.disabled {
    cursor: not-allowed;
    color: $devui-disabled-text;
    background-color: $devui-disabled-bg;
    border-color: $devui-disabled-line;

    span {
      padding-right: 0;
      color: $devui-disabled-text;
    }
  }

  .devui-select-tag-remove-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    // line-height: 12px;
    // text-align: center;
    color: $devui-text; // TODO： Color-Question
    width: 12px;
    height: 12px;
    // display: inline-block;
    transition: transform 0.2s ease;
    pointer-events: auto;
    cursor: pointer;
    background-color: $devui-line;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;

    svg path {
      fill: $devui-light-text; // TODO: Color-Question
    }

    &:hover {
      background-color: $devui-icon-fill-active;
    }
  }
}
